#ifndef CMETHOD_H
#define CMETHOD_H

#include <QObject>
#include "cobject.h"

class CMethod : public CObject
{
    Q_OBJECT
//    Q_PROPERTY(int id READ id WRITE setId NOTIFY idChanged)
    Q_PROPERTY(int recipeId READ recipeId WRITE setRecipeId NOTIFY recipeIdChanged)
    Q_PROPERTY(int step READ step WRITE setStep NOTIFY stepChanged)
    Q_PROPERTY(QString description READ description WRITE setDescription NOTIFY descriptionChanged)
    Q_PROPERTY(int costTime READ costTime WRITE setCostTime NOTIFY costTimeChanged)
    Q_PROPERTY(QString picture READ picture WRITE setPicture NOTIFY pictureChanged)
public:
    CMethod(QObject *parent = NULL);

//    int id();
//    void setId(int id);

    int recipeId();
    void setRecipeId(int recipeId);

    int step();
    void setStep(int step);

    QString description();
    void setDescription(QString description);

    int costTime();
    void setCostTime(int costTime);

    QString picture();
    void setPicture(QString picture);

signals:
//    void idChanged();
    void recipeIdChanged();
    void stepChanged();
    void descriptionChanged();
    void costTimeChanged();
    void pictureChanged();

private:
//    int m_id;
    int m_recipe_id;
    int m_step;
    QString m_description;
    int m_cost_time;
    QString m_picture;
};

#endif // CMETHOD_H
